<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1 align="center" style="color:red;">首页</h1>

    {% if name %}
        <a href="/loginout">你好！{{name}}</a>
    {% else %}
        <a href="/login">跳转登录页面</a>
    {% endif %}
    <a href="/nav">跳转导航条页面</a>
    <div>
        <form action="/index/" method="get">
            <input type="text" name="search"  value="" />
            <input type="submit" name="" value="搜索" /><br/>
        </form>
    </div>
    <table>
        <thead>
            <tr>
                <th>商品序号</th>
                <th>商品名称</th>
                <th>商品图片</th>
                <th>商品价格</th>
                <th>商品数量</th>
            </tr>
        </thead>
        <tbody>
            {% for good in goods %}
            <tr>
                <td>{{good.goodsid}}</td>
                <td><a href="/detail/?goodsid={{good.goodsid}}">{{good.goodsname}}</a></td>
                <td><img src="{{good.goodsimg}}" width="50" height="50"></td>
                <td>{{good.goodsprice}}</td>
                <td>{{good.goodscount}}</td>
            </tr>
            {% endfor %}
        </tbody>
        <tfoot>
            <tr>
                <th colspan="5">
                    {% for item in pagelist %}
                    <a href="/index/?page={{item}}">{{item}}</a>
                    {% endfor %}
                </th>
            </tr>
        </tfoot>
    </table>
    <a href="/shoppingcar/" ><input type="button" value="我的购物车"></a>
</body>
</html>